projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8e98fd
)
(detect_coding_utf_16): Fix the logic of rejecting
author
Kenichi Handa
<handa@m17n.org>
Tue, 16 Jun 2009 01:17:10 +0000
(
01:17
+0000)
committer
Kenichi Handa
<handa@m17n.org>
Tue, 16 Jun 2009 01:17:10 +0000
(
01:17
+0000)
UTF-16 by checking the dispersion of Eth and Oth bytes.
src/coding.c
patch
|
blob
|
history
diff --git
a/src/coding.c
b/src/coding.c
index 8c43929693e2bd745f7aefb21547834c4a41aedd..8d90297db0f26a667e42161aca7672b53a32a24b 100644
(file)
--- a/
src/coding.c
+++ b/
src/coding.c
@@
-1677,14
+1677,14
@@
detect_coding_utf_16 (coding, detect_info)
{
e[c1] = 1;
e_num++;
- if (e_num >= 128)
+ if (e_num >= 128
&& o_num >= 128
)
break;
}
if (! o[c2])
{
o[c2] = 1;
o_num++;
- if (o_num >= 128)
+ if (
e_num >= 128 &&
o_num >= 128)
break;
}
}